package loginAction;

import com.opensymphony.xwork2.ActionSupport;
import loginBean.LoginBean;

public class LoginAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String userName;
	private String password;
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String execute()throws Exception{
		LoginBean lb=new LoginBean();
		if(lb.login(userName, password)){
			return SUCCESS;
		}
		else{
			return ERROR;
		}
	}

}
